package com.ruoyi.crm.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.core.domain.BaseFlowEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 收付款管理对象 crm_order_collect_pay_money
 *
 * @author yanwenliang
 * @date 2024-11-27
 */
@Data
@TableName("crm_order_collect_pay_money")
public class CrmOrderCollectPayMoney extends BaseFlowEntity {
    private static final long serialVersionUID = 1L;

    /** 收付款id */
    @TableId(type = IdType.ASSIGN_ID)
    private String collectPayMoneyId;

    /** 款项类型（0 付款 1 收款） */
    @Excel(name = "款项类型", readConverterExp = "0=,付=款,1=,收=款")
    private String moneyType;

    /** 款项归属人 */
    @Excel(name = "款项归属人")
    private String userId;

    /** 商机id */
    private String orderId;

    /** 项目id */
    private String projectId;

    /** 审核状态 */
    private String auditStatus;

    /** 流程实例的id */
    private Long instanceId;

    /** 节点编码 */
    private String nodeCode;

    /** 流程节点名称 */
    private String nodeName;
    /** 客户id */
    private String customerId;


    /** 删除标记（0 未删除 1 删除） */
    @TableLogic
    private String delFlag;

    @Excel(name = "备注")
    private String remark;

    /** 付款明细集合 */
    @TableField(exist = false)
    private List<CrmOrderPayDetails> payDetailsList = new ArrayList<>();

    /** 付款明细集合 */
    @TableField(exist = false)
    private List<CrmOrderCollectDetails> collectDetailsList = new ArrayList<>();

    /** 所属客户 */
    @Excel(name = "所属客户")
    @TableField(exist = false)
    private String orderName;

    /** 所属商机 */
    @Excel(name = "所属商机")
    @TableField(exist = false)
    private String customerName;


    /** 款项所属人 */
    @Excel(name = "款项所属人")
    @TableField(exist = false)
    private String userName;

    /**
     * 已收款金额
     */
    @TableField(exist = false)
    private BigDecimal collectionCountAmt;

    /**
     * 未收款金额
     */
    @TableField(exist = false)
    private BigDecimal noCollectionCountAmt;
}
